<?php
    require_once 'classes/Login.php';
    require_once 'classes/JobPost.php';
    $Login = new Login;
    if(!$Login->verify())
    {
        header('Location:login.php');
    }
    $JobPost = new JobPost();
    include 'includes/header.inc.php';
	$catID = 0;
?>
            <div id="form">
                <h1>Post New Job Listing</h1>
                    <fieldset id="jobPostingForm">
                            <form id="jobPostForm" method="post" action="/sandbox1/previewPost.php">
                                    <input type="hidden" id="formName" name="formName" value="newJobPost"/>
                                    <p>
                                        <label for="jobTitle">Job Title: </label>
                                        <input type="text" name="jobTitle" id="jobTitle" class="input" value="" style="width:450px;"/>
                                    </p>
                                    <p style="height:35px;">
                                        <?php echo $JobPost->getCategories('jobPost',$catID); ?>
                                    </p>
                                    <p>
                                        <label for="decription">Job Description: </label>
                                        <textarea id="description" name="description" style="width:455px;"></textarea>
                                    </p>
                                    <p>
                                        <label for="salary">Job Salary: </label>
                                        <input type="text" name="salary" id="salary" class="input postjob" value="" style="width:450px;"/>
                                    </p>
                                    <p style="height:35px;">
                                        <label for="hide">Hide: </label>
                                        <input type="checkbox" name="hideName" id="hideName" class="check"/><span>Company Name</span>
                                        <input type="checkbox" name="hideSalary" id="hideSalary" class="check"/><span>Salary</span>
                                    </p>
                                    <p style="height:40px;">
                                        <?php echo $JobPost->getCountries(); ?>
                                    </p>
                                    <div class="location">
                                        <label for="location">Location: </label>
                                        <div class="locationInner" style="text-align:left; margin-left:135px; width:400px;">
                                            <label for="city1" style="width:40px;">City: </label>
                                            <input type="text" name="city1" id="city1" class="input city">
                                            <br/>
                                            <label for="state1" style="width:40px;">State: </label>
                                            <select name="state1" id="state1" class="state" >
                                                <option>  </option>
                                            </select>
                                        </div>
                                </div>
                                <p id="addLoc">
                                    <a href="javascript:void(0);" id="addLocation"><img src="/sandbox1/media/images/add.png" alt="Add Location" style="padding-right:5px;"/></a>
                                </p>
                                <p>
                                    <input type="submit" name="previewPost" id="previewPost" class="button" value="Preview Post" />
                                </p>
                            </form>
                    </fieldset>
                    <div id="loading"><img src="/sandbox1/media/images/loader.gif" alt="Loading..." /></div>
                    <div id="feedback"></div>
            </div>
<?php include 'includes/footer.inc.php'; ?>